package myzd.mapper;

import myzd.domain.response.Content;
import org.apache.ibatis.annotations.*;

import java.util.ArrayList;
import java.util.List;

/**
 * @author WangLei
 * @since 2017/11/22 9:14
 */
@Mapper
public interface CmsMapper {
  @Select("SELECT * FROM blog_content")
  ArrayList<Content> listAllContents();

  @Select("SELECT id FROM blog_content WHERE cid = #{cid}")
  List<Integer> listContentIdsById(@Param("cid") Long cid);

  @Select("SELECT id FROM blog_content WHERE cid = #{cid}")
  Content getContentDetailsById(@Param("cid") Long cid);

}
